package com.aspose.cells;

class zbsc {
   static Object a(double[] var0, int var1, int var2, double[] var3, int var4, int var5) {
      double var6 = a(var0, var1, var2);
      double var8 = a(var3, var4, var5);
      double var10 = b(var0, var1, var2, var3, var4, var5);
      double var12 = (var6 - var8) / Math.sqrt(var10 * (1.0D / (double)var2 + 1.0D / (double)var5));
      return var12;
   }

   static Object a(double var0, double var2, double var4, double var6, int var8, int var9) {
      double var10 = (var0 - var2) / Math.sqrt(var4 / (double)var8 + var6 / (double)var9);
      return var10;
   }

   static Object a(double var0, int var2, double var3, int var5) {
      double var6 = (var0 / (double)var2 + var3 / (double)var5) * (var0 / (double)var2 + var3 / (double)var5) / (var0 / (double)var2 * (var0 / (double)var2) / (double)(var2 - 1) + var3 / (double)var5 * (var3 / (double)var5) / (double)(var5 - 1));
      return var6;
   }

   static double a(double[] var0, int var1, int var2) {
      double var3 = 0.0D;

      for(int var5 = 0; var5 < var2; ++var5) {
         var3 += (var0[var5 * var1] - var3) / (double)(var5 + 1);
      }

      return var3;
   }

   static double b(double[] var0, int var1, int var2, double[] var3, int var4, int var5) {
      double var6 = b(var0, var1, var2);
      double var8 = b(var3, var4, var5);
      double var10 = ((double)(var2 - 1) * var6 + (double)(var5 - 1) * var8) / (double)(var2 + var5 - 2);
      return var10;
   }

   static double b(double[] var0, int var1, int var2) {
      double var3 = a(var0, var1, var2);
      return a(var0, var1, var2, var3);
   }

   static double a(double[] var0, int var1, int var2, double var3) {
      double var5 = b(var0, var1, var2, var3);
      return var5 * ((double)var2 / (double)(var2 - 1));
   }

   static double b(double[] var0, int var1, int var2, double var3) {
      double var5 = 0.0D;

      for(int var7 = 0; var7 < var2; ++var7) {
         double var8 = var0[var7 * var1] - var3;
         var5 += (var8 * var8 - var5) / (double)(var7 + 1);
      }

      return var5;
   }

   static Object a(double[] var0, double[] var1) {
      double var2 = 0.0D;
      double var4 = 0.0D;
      double var6 = 0.0D;
      int var8 = var0.length;

      for(int var9 = 0; var9 < var8; ++var9) {
         var6 = var0[var9] - var1[var9];
         var2 += var6;
         var4 += var6 * var6;
      }

      double var11 = var2 / ((double)var8 * Math.sqrt(((double)var8 * var4 - var2 * var2) / (double)(var8 * var8 * (var8 - 1))));
      return Math.abs(var11);
   }

   static Object a(double[] var0, double[] var1, int var2, int var3) {
      boolean var4 = false;
      double var5 = 0.0D;
      Object var7;
      if (var3 == 1) {
         if (var0.length != var1.length) {
            return zst.c;
         }

         var7 = a(var0, var1);
         var5 = (double)(var0.length - 1);
      } else if (var3 == 2) {
         var7 = a(var0, 1, var0.length, var1, 1, var1.length);
         var5 = (double)(var0.length + var1.length - 2);
      } else {
         if (var3 != 3) {
            return zst.f;
         }

         double var8 = b(var0, 1, var0.length);
         double var10 = b(var1, 1, var1.length);
         double var12 = a(var0, 1, var0.length);
         double var14 = a(var1, 1, var1.length);
         var7 = a(var12, var14, var8, var10, var0.length, var1.length);
         var5 = (Double)a(var8, var0.length, var10, var1.length);
      }

      boolean[] var16 = new boolean[]{var4};
      double var9 = zbop.a((Double)var7, var5, var2, var16);
      var4 = var16[0];
      return var9;
   }
}
